package com.snail.service;

import com.alipay.api.AlipayApiException;
import com.baomidou.mybatisplus.extension.service.IService;
import com.snail.model.dto.PayRecordDto;
import com.snail.model.dto.PayStatusDto;
import com.snail.model.dto.QRCodeDto;
import com.snail.model.pojo.BizOrder;
import com.snail.model.vo.BizOrderVo;
import com.snail.response.BaseResponse;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;

import java.io.IOException;
import java.util.List;

/**
 * @author Monica
 * @description 针对表【biz_order(订单表)】的数据库操作Service
 * @createDate 2025-07-23 14:30:24
 */
public interface BizOrderService extends IService<BizOrder> {

    BaseResponse<QRCodeDto> createOrder(BizOrderVo bizOrderVo);

    QRCodeDto createQRCode(Integer id);

    void requestPay(String payNo, Integer paymentMethod, HttpServletResponse httpResponse) throws AlipayApiException, IOException;


    BaseResponse<PayRecordDto> queryPayResult(String payNo);

    void saveAliPayStatus(PayStatusDto payStatusDto);

    void payNotify(HttpServletRequest request, HttpServletResponse response) throws AlipayApiException;

    BaseResponse<List<BizOrder>> findAllOrders(Integer userId);
}

